XBMBROWSER

Section: User Commands (1)
Updated: 08 Jan 1993
Index Return to Main Contents
 

NAME

xbmbrowser - view and manage X bitmap and X pixmap files.  

SYNOPSIS

xbmbrowser [ toolkit options ] [ directory ]  

DESCRIPTION

xbmbrowser will show you all the bitmaps or pixmaps in the directory if it is specified otherwise it will look in the current directory. Note that if the program can not change directory to the directory in the command line it will exit and print an error message.

You can then select any bitmap that is displayed and you will be able to Rename, Copy, Delete, Edit and Set it as the root window bitmap. (Edit and SetRoot may not work on your installation - you will have to try it to find out).

xbmbrowser will take all the normal Athena Widget toolkit options it is given.

 

USER DEFINABLE MENU

This version of xbmbrowser has a user definable menu of commands that can be executed for a bitmap. There is a default setup file but you can have your own file called .xbmbrowserrc in your home directory. The format is discussed below.

Comments are denoted by a # as the first letter on a line

Each line is one menu entry. They have the format of:

"Menu Name" "command" "popup query string"

The line MUST begin in the first character. that is LEFT JUSTIFIED or it will be ignored.

The Command is any unix command and is executed by a system() call. In the command there are some place holders that you can use.

%b - Current bitmap name (no path)
%B - Current bitmap name (with full path)
%u - Users input string (default value in text box is %b)
%n - Users input string (default value in text box is blank)
%d - Current Directory

The Menu Name, command, and popup query string MUST exist in that order, however if the popup is NOT wanted then make the popup query string an empty string (""). If the popup query is not used and the %u place holder is used in the command, an error message will be given and the menu item will not appear.

The Popup Query will ALWAYS contain an Ok button which will execute the command and a Cancel button which will cancel the command. If, in the command, the users input string is used, the popup query will also have a text input box that the user can enter a string into. The current bitmap name is showen in the text box as the default value and can be changed. The popup will also contain the text in the popup query string.

The use of a "~" and its associated shorthand directory notations (~/ = home, ~user = user's home) are allowed in the command and in the string entered by the user in the popup query, They will be expanded before the command is executed.

NOTE that when it is expanded there WILL NOT be a '/' at the end of the directory name, so if you are going to concatinate another name to it then make sure that you put a '/' before the other one. Note also that the %b string does NOT have a leading '/'.

Some commands will not change the bitmaps in the current directory in any way so that the directory doesn't have to be rescanned, to indicate that a rescan is unneccessory, start the line with a "!". This is done with the Set Root, and Grab menu items below.

 

EXAMPLE .xbmbrowserrc FILE

# This is the setup file for xbmbrowser version 2.0
#
# Rename Menu Entry
"Rename" "mv %b %u" "Enter The New Name:"

# Copy Menu Entry
"Copy" "cp %b %u" "Copy to:"

# Delete Menu Entry
"Delete" "rm %b" "Really delete it?"

# Edit Menu Entry
!"Edit" "bitmap %b&" ""

# Set the bitmap as the root decoration
!"Set Root" "setroot -bitmap %b" ""

# Grab it Menu Entry
!"Grab It" "cp %b ~/X11/icons/%b" ""

For more examples look in the default menu definition file.

For instructions on how to use xbmbrowser , start it and press the Help Button.

 

FILES

/usr/local/X11R5/libX11/xbmbrowser.help 
     help file that is displayed in the
     help window.

/usr/local/X11R5/libX11/xbmbrowser.menu 
     default menu definition file. 

Note - These files might be in a different directory on your system.

 

AUTHOR

Ashley Roll -- aroll@gucis.cit.gu.edu.au


 

Index

NAME
SYNOPSIS
DESCRIPTION
USER DEFINABLE MENU
EXAMPLE .xbmbrowserrc FILE
FILES
AUTHOR

This document was created by man2html, using the manual pages.
Time: 11:31:02 GMT, February 07, 2023